<template>
	<view class="statis">
		<view class="top">
			<image :src="store.logo"></image>
			<view>{{store.title}}</view>
			<view class="money">{{title.money}}</view>
			<view>{{store.status_text}}</view>
		</view>
		<view class="content">
			<view class="item">
				<text>商品说明</text>
				<text>{{detail.order_title}}</text>
			</view>
			<view class="item">
				<text>订单号</text>
				<text>{{detail.order_no}}</text>
			</view>
			<view class="item">
				<text>下单时间</text>
				<text>{{detail.order_time}}</text>
			</view>
			<view class="item">
				<text>商品总价</text>
				<text>{{detail.total_money}}</text>
			</view>
			
			<view class="item">
				<text>优惠券</text>
				<text>{{detail.district_money ?detail.district_money : 0 }}</text>
			</view>
			<view class="item">
				<text>服务费</text>
				<text>{{detail.sevi_money}}</text>
			</view>
			
			<view class="item">
				<text>实付价格</text>
				<text>{{detail.pay_money}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {bonusDetail } from "../../../apis/shop/api.js"
	export default{
		data(){
			return{
				bonus_id:"",
				token:"",
				store_id:"",
				store:"",
				detail:"",
			}
		},
		onLoad(option) {
			console.log(option)
			this.bonus_id = option.id;
			this.store_id = uni.getStorageSync("store_id");
			this.token = uni.getStorageSync("token");
			this.getdata()
		},
		methods:{
			getdata(){
				let that = this
				bonusDetail(
				{
					store_id:that.store_id,
					token:that.token,
					bonus_id:that.bonus_id
				}).then(res=>{
					if(res.code == 1){
						that.store = res.data.store
						that.detail = res.data.detail
						
					}
				})
			}
		}
	}
</script>

<style lang="less">
	.top{
		text-align: center;
		background-color: #f8f8f8;
		padding: 40rpx;
		image{
			width: 96rpx;
			height: 96rpx;
			border-radius: 96rpx;
		}
		view{
			font-size: 30rpx;
			color: #333;
			line-height: 48rpx;
			.money{
				font-size: 60rpx;
			}
		}
	}
	.content{
		background-color: #FFFFFF;
		padding: 0 30rpx;
		.item{
			padding: 30rpx;
			border-bottom: 1rpx solid #ccc;
			text{
				font-size: 30rpx;
				color: #999;
				&:nth-child(2){
					float: right;
					color: #333;
				}
			}
		}
	}
</style>
